var maps = [];

describe('view accessibility', function() {
	before(function(done) {
		app.listen(0, done);

		maps.push('/');
		maps.push('/account/reg');
		maps.push('/account/signin');
	});
	describe('#index', function() {
		it('/view', function(done) {
			var count = 0;
			maps.forEach(function(map) {
				request(app).get(map).end(function(err, res) {
					res.statusCode.should.equal(200)
					if(++count == maps.length) {
						done();
					}
				})
			})
		})
	})
	describe('#Does not exist', function() {
		it('GET /other should not found the page', function(done) {
			request(app).get('/noexists').expect(404, done);
		});
	})
})


/*
describe('Array', function() {
	describe('#indexOf()', function() {
		it('should return -1 when the value is not present', function() {
			var spy = sinon.spy();
			var proxy = once(spy);

			proxy();
			proxy();

			assert(spy.should.have.been.calledOnce);
		})
	})

	describe('#test2', function() {
		it('t2', function() {
			var object = {
				method: function() {}
			};
			var spy = sinon.spy(object, "method");
			object.method(42);
			object.method(42);
			assert(spy.withArgs(42).should.have.been.calledOnce)
		})
	})
})
*/